var listObj = getAllData();
var table = document.getElementById("table")
var box = document.getElementById("box")
var tbody = document.getElementById("tbody");

var text=localStorage.getItem('shop');
			console.log(text);
			var obj=JSON.parse(text)
			console.log(obj);			
			obj.splice(1,1);
			console.log(obj);
			
			
			
						
					var text0=JSON.stringify(obj)
					
					localStorage.setItem('shop',text0);

if(listObj.length == 0) { //购物车为空
	box.className = "box";
	table.className = "hide";
} else {
	box.className = "box hide";
	table.className = "";
	for(var i = 0, len = listObj.length; i < len; i++) {
		var tr = document.createElement("tr");
		tr.setAttribute("pid", listObj[i].pid);
		//{"pid":值,"pImg":值,"pName":值,"pDesc":值,"price":值,"pCount":1},
		tr.innerHTML = '<td>' +
			'<input class="check-one check" type="checkbox">' +
			'</td>' +
			'<td>' +
			'<img src="' + listObj[i].pImg + '" alt="" /><span>' + listObj[i].id + listObj[i].id1 + listObj[i].id2 '</span><em>款式：' + listObj[i].id1 + '</em><em>尺寸：' + listObj[i].id1 + '</em>' +
			'</td>' +
			'<td>' +
			'￥<span>' + listObj[i].pDesc + '</span>' +
			'</td>' +
			'<td>' +
			'<span class="reduce">-</span><input type="text" value="' + listObj[i].pCount + '" readonly="readonly" /><span class="add">+</span>' +
			'</td>' +
			'<td>' +
			'￥<span>' + listObj[i].price * listObj[i].pCount + '</span>' +
			'</td>' +
			'<td>' +
			'<span>加入收藏夹</button>''<button class="delete" >删除</button>' +
			'</td>';
		tbody.appendChild(tr);
	}
}